// index.js
const app=getApp()
Page({
  data:{
    book:'穆斯林的葬礼',
    publish:'1982-8-6',
    people:{
     name:'李华',
     age:22,
     hobby:'篮球'
    },
    person:[
      {
        id:101,
        name:'张恩',
        address:'湖南'
      },
      {
        id:102,
        name:'张文',
        address:'关西'
      },
      {
        id:103,
        name:'文华',
        address:'广东'
      }
    ]
  },
  changeVal(){
    this.setData({
      people:{
        age:42
      }
    })
    console.log('---changeVal---');
  },
  toSecond(){
    wx.navigateTo({
      url: '/pages/second/index',
    })
    console.log('---second---');
  },
  onLoad() {
    console.log('---index---onLoad---',app.globalData)
  },
  onShow() {
    console.log('---index---onShow---')
  },
  onReady(){
    console.log('---index---onReady---')
  },
  onHide() {
    console.log('---index---onHide---')
  },
  onUnload() {
    console.log('---index---onUnload---')
  }
})
